<template>
    <el-container>
        <el-aside width="200px">
          <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            background-color="#D3DCE6"
            text-color="#333"
            active-text-color="#409EFF">
            <el-menu-item index="1">
              <i class="el-icon-menu"></i>
              <span>首页</span>
            </el-menu-item>
            <el-menu-item index="2">
              <i class="el-icon-document"></i>
              <span>文档</span>
            </el-menu-item>
            <el-menu-item index="3">
              <i class="el-icon-setting"></i>
              <span>设置</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-container>
            <el-header>
              <div class="header-content">
                <h2>图书管理系统</h2>
                <div class="user-info">
                  <el-avatar icon="el-icon-user-solid"></el-avatar>
                  <span>管理员</span>
                </div>
              </div>
            </el-header>
            <el-main>
                <MyTable/>
            </el-main>
        </el-container>
    </el-container>
</template>

<script>
import MyTable from './MyTable.vue'

export default {
    name: 'HelloWorld',
    props: {
        msg: String
    },
    components: {
        MyTable,
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
 .el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
  }
  
  .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 30px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
  }
  
  .el-menu {
    border-right: none;
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 100px;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }
  
  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
